1. Field of the Invention
The present invention relates to an image processing apparatus, control method, and computer-readable medium for estimating the color temperature of a capturing light source for input digital image data, and correcting the color balance of the image in accordance with the color temperature.
2. Description of the Related Art
There has conventionally been proposed a method of estimating a capturing light source and correcting the color balance for image data captured by a digital camera or image data obtained by optically scanning a film on which an analog camera captures an image.
In a method disclosed in Japanese Patent Laid-Open No. 2002-152772, the blackbody locus of gray and the skin color based on the typical spectral distribution of a camera is held in advance. To perform inverse conversion of color balance correction of a camera, the R, G, and B components of respective pixels are multiplied by various coefficients. The number of pixels present near the blackbody locus among pixels after the conversion is evaluated to estimate a capturing light source. After estimating the light source, the converted image is converted into a color under a predetermined light source.
This color balance correction method has the following problem. In Japanese Patent Laid-Open No. 2002-152772, the image is only converted into a color under a predetermined light source after estimating the light source. In this case, “appearance” visually recognized by the photographer in the moment of capturing is not reproduced.
The human eye has a chromatic adaptation function. For example, when a man stays under daylight (color temperature of about 5,500 K (kelvins)) for a while and then enters a room equipped with an incandescent lamp (color temperature of about 3,000 K), a white object seems orangey immediately after he enters the room. However, the object seems almost achromatic after a while. This is chromatic adaptation which acts when illumination light is colored, in order to maintain appearance under daylight by performing different sensitivity adjustments by three cones (L, M, and S) of the human eye.
However, chromatic adaptation is known not to act perfectly. More specifically, when a man stays in a room equipped with an incandescent lamp for a long time, a white object seems almost achromatic but not completely achromatic. This is called incomplete adaptation.
In this way, the human eye perceives an object in an incompletely adapted state under the illumination light source. For this reason, an image after color balance correction differs from one actually perceived by the human eye unless “appearance” on the moment is reproduced, and the user feels the corrected image to be unnatural. To solve this problem, it is desirable to estimate a capturing light source, and perform color balance correction considering the human visual characteristic under the light source. However, no such proposal has been made.